#ifndef EXPRESULTCALFRAME_H
#define EXPRESULTCALFRAME_H

#include <QFrame>
#include "experiment.h"
#include "myqwtplot.h"
#include <QModelIndex>
#include <QTableWidgetItem>
namespace Ui {
class ExpResultCalFrame;
}

class ExpResultCalFrame : public QFrame
{
    Q_OBJECT
    
public:
    explicit ExpResultCalFrame(QWidget *parent = 0,Experiment* pExperiment=NULL);
    ~ExpResultCalFrame();
    
    void LoadData();
    bool CalFunction(int count);//count次多项式
private:
    Ui::ExpResultCalFrame *ui;
    Experiment* pExperiment;

    MyQwtPlot *pQwtPlotCal;
    QwtPlotCurve *pCurve;
    QList<QwtPlotMarker *> pMarkers;


    void UpdateTable(QString);
    void UpdatePlot(QString);
    void UpdateOther(QString);
private slots:
    void on_comboBox_Type_currentIndexChanged(const QString &arg1);
    void OnCurrentRowChanged(QModelIndex,QModelIndex);
    void on_tableWidget_Element_itemChanged(QTableWidgetItem *item);
};

#endif // EXPRESULTCALFRAME_H
